<header class="header">
	<nav class="navbar navbar-my" role="navigation">
		<div class="container-fluid"> 
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="navbar-collapse-top">
					<span class="sr-only">菜单</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="<?php echo site_url('admin'); ?>">安乐窝后台</a>
			</div>
			<!--/.nav-header --> 
			<div class="collapse navbar-collapse" id="navbar-collapse-top">
<?php if (isset($menus['lv1'])) { ?>
				<ul class="nav navbar-nav">
<?php
		foreach ($menus['lv1'] as $menu) {
			$active_class = '';
			if (isset($menu['_css_class'])) $active_class = ' class="active"';
			$url = site_url(DIRECTORY_NAME . $menu['name']);
?>
					<li<?php echo $active_class; ?>><a href="<?php echo $url; ?>"><?php echo $menu['title']; ?></a></li>
<?php
		}
?>
				</ul>
<?php } ?>
				<ul class="nav navbar-nav navbar-right">
					<li><a href="<?php echo site_url('admin/user'); ?>">admin</a></li>
					<li><a href="<?php echo site_url('admin/auth/logout'); ?>">退出</a></li>
				</ul>
			</div>
			<!-- /.navbar-collapse --> 
		</div>
		<!-- /.container-fluid --> 
	</nav>
</header>
